﻿namespace LinkedTU.Models
{
    using LinkedTU.Common.Constants;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;

    public class Recommendation : BaseDbEntity
    {
        [Key]
        public int RecommendationId { get; set; }

        [MinLength(ValidationConstants.MinRecommendationTextLength)]
        [MaxLength(ValidationConstants.MaxRecommendationTextLength)]
        public string Text { get; set; }

        public int Order { get; set; }

        [ForeignKey("RecommendedUser")]
        public string RecommendedUserId { get; set; }

        public virtual ProfileInfo RecommendedUser { get; set; }

        [ForeignKey("RecommendedBy")]
        public string RecommendedById { get; set; }

        public virtual ProfileInfo RecommendedBy { get; set; }
    }
}
